package com.asohofrucol.dao;

import java.util.List;

import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.query.Param;

import com.asohofrucol.model.ColMunicipality;

public interface ColMunicipalityDao extends
		JpaRepository<ColMunicipality, String> {

	@Query("SELECT p FROM ColMunicipality p WHERE p.colDepartament.codDepartament = :codDepartament ORDER BY p.namMunicipality")
	public List<ColMunicipality> listByCodDepartament(
			@Param("codDepartament") String codDepartament);

}
